package com.tan.domain;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author by 团子
 * @Classname User
 * @Description TODO
 * @Date 2022/1/5 11:22
 * @Created by 团子
 */
@Component
@ConfigurationProperties(value = "user")
public class User {
    @Value("${user.names}")
    private String namesa;

    @Value("${user.age}")
    private Integer agea;

    private String names;
    private Integer age;

    public String getNamesa() {
        return namesa;
    }

    public void setNamesa(String namesa) {
        this.namesa = namesa;
    }

    public Integer getAgea() {
        return agea;
    }

    public void setAgea(Integer agea) {
        this.agea = agea;
    }

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "namesa='" + namesa + '\'' +
                ", agea=" + agea +
                ", names='" + names + '\'' +
                ", age=" + age +
                '}';
    }
}
